// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/css/style.less'
import store from './store'
import MavonEditor from 'mavon-editor'
import './assets/img/icons/iconfont'



import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'

import hl from 'highlight.js' // 导入代码高亮文件
import 'highlight.js/styles/a11y-dark.css' 

import highlightPlugin from "@highlightjs/vue-plugin";

import App from './App'
import router from './router'
Vue.use(highlightPlugin);



Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(MavonEditor)
// 自定义一个代码高亮指令
Vue.directive('highlight', function (el) {
  const blocks = el.querySelectorAll('pre code')
  blocks.forEach((block) => {
    hl.highlightBlock(block)
  })
})


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>',
  store
})
